package com.draemoncode.weixindb.content;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zhou on 2017/4/22.
 */
public class EnvContent {

    private static ThreadLocal<Map<String, Object>> env = new ThreadLocal<>();

    public static void put(String key, Object value){
        Map<String, Object> stringObjectMap = env.get();
        if(stringObjectMap == null){
            Map<String, Object> values = new HashMap<>();
            env.set(values);
        }
        env.get().put(key, value);
    }

    public static Object get(String key){
        return env.get().get(key);
    }

}
